#include<bits/stdc++.h>
using namespace std;

int main()
{
    ifstream in("email.txt",ios::in|ios::binary);
    vector<string> str;
    string line;
    int num=0;
    while (getline(in,line))
    {
        str.push_back(line);
    }
    in.close();

    regex reg("<[^>]+>");
    smatch result;
    for(int i=0 ; i<str.size();i++)
    {
        if(regex_search(str[i],result,reg))
        cout<<result.str()<<"\n";
    }
    

    return 0;
}